//package Util;
//
//import jakarta.servlet.annotation.WebListener;
//import jakarta.servlet.http.HttpSessionEvent;
//import jakarta.servlet.http.HttpSessionListener;
//
//import java.util.concurrent.atomic.AtomicInteger;
//
//@WebListener
//public class SessionListener implements HttpSessionListener {
//    private static final AtomicInteger activeSessions = new AtomicInteger();
//
//    @Override
//    public void sessionCreated(HttpSessionEvent se) {
//        activeSessions.incrementAndGet();
//    }
//
//    @Override
//    public void sessionDestroyed(HttpSessionEvent se) {
//        activeSessions.decrementAndGet();
//    }
//
//    public static int getActiveSessionCount() {
//        return activeSessions.get();
//    }
//}
